Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Fix the hang of the spinner and progress bar on stop #162

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

cardil
Copy link
Contributor

@cardil cardil commented Mar 21, 2024

Changes

  • 🐞 Fix the hang of the spinner on stop
  • 🐞 Fix the hang of the progress bar on stop

/kind bug

Fixes #160
Fixes #161

Release Note

The spinner and progress bar will no longer hang on exit, which may occur on some fast rendering setups

Copy link

knative-prow bot commented Mar 21, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. labels Mar 21, 2024
@knative-prow knative-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 21, 2024
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 27.77778% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 57.56%. Comparing base (325b48c) to head (dd86562).

Files Patch % Lines
pkg/output/tui/progress.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     knative/client-pkg#162      +/-   ##
==========================================
- Coverage   57.57%   57.56%   -0.01%     
==========================================
  Files         112      112              
  Lines        8379     8387       +8     
==========================================
+ Hits         4824     4828       +4     
- Misses       3294     3298       +4     
  Partials      261      261              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cardil
Copy link
Contributor Author

cardil commented Mar 21, 2024

Although the 0ff3298 fix the hanging of #161, it causes the https://github.com/cardil/ghet progress bar stops rendering to early, leading to the final output could show progress bars which are not 100%, even if completed successfully:

$ go run ./cmd/ght download --destination /tmp/ghet golangci/golangci-lint
⛳️ Getting information about latest release Done
🎉 Found 2 matching assets for v1.57.1
📥 12 golangci-lint-1.57.1-linux-amd64.tar.gz  █████████████████████████████████████████░░░░  88% ⋮  20.19 MiB/s ⋮  10.55 MiB
📥 22 golangci-lint-1.57.1-checksums.txt       ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0% ⋮   0.00 B/s   ⋮   5.13 KiB
🔍 Verifying checksum for golangci-lint-1.57.1-linux-amd64.tar.gz Done
✅ All checksums match the downloaded assets
📦 Extracting archive: golangci-lint-1.57.1-linux-amd64.tar.gz
🎯 golangci-lint  ████████████████████████████████████████████████████████████████████████░░  97% ⋮  58.18 MiB/s ⋮  26.64 MiB

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 21, 2024
@cardil cardil force-pushed the bugfix/quit-wait-race branch 13 times, most recently from 81c6bd5 to 0ef424a Compare March 22, 2024 13:19
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 22, 2024
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 22, 2024
@cardil cardil changed the title [WIP] 🐞 Fix the hang of the spinner nad progress bar on stop 🐞 Fix the hang of the spinner nad progress bar on stop Mar 22, 2024
@cardil cardil marked this pull request as ready for review March 22, 2024 13:31
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 22, 2024
@knative-prow knative-prow bot requested a review from krsna-m March 22, 2024 13:31
@cardil
Copy link
Contributor Author

cardil commented Mar 22, 2024

/cc @dsimansk

I think I got it. This version was tested against both e2e tests in magetasks, and the ghet tool (the progress bar UI is completed now).

@knative-prow knative-prow bot requested a review from dsimansk March 22, 2024 13:34
Copy link
Contributor

@dsimansk dsimansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

I'm OK to merge per Chris' proposal even with not so polished end of progress bar for now. And further improve in next iterations.

Adding hold for other reviews, feel free to unhold per my comment above.
/hold

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 22, 2024
@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 22, 2024
Copy link

knative-prow bot commented Mar 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cardil, dsimansk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 22, 2024
@cardil cardil changed the title 🐞 Fix the hang of the spinner nad progress bar on stop 🐞 Fix the hang of the spinner and progress bar on stop Mar 22, 2024
@cardil
Copy link
Contributor Author

cardil commented Mar 22, 2024

/unhold

I'll create an issue to track the removal of the explicit wait. Thx @dsimansk!

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 22, 2024
@knative-prow knative-prow bot merged commit cf1573f into knative:main Mar 22, 2024
21 checks passed
@cardil cardil deleted the bugfix/quit-wait-race branch March 22, 2024 17:19
@lkingland
Copy link
Member

lkingland commented Mar 24, 2024

/lgtm

Glad this is being merged now, and we can track that quirk separately 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
3 participants